from django.db import models
from contifyuser.models import Member
from django.contrib.auth.models import User
from django.conf import settings
import datetime
from StartGroup.models import Group
from datetime import date
from django.db.models.signals import post_save
from utils import signals

class Events(models.Model):
    group = models.ForeignKey(Group, to_field='group_web_address', unique=False)  
    event_name = models.CharField(max_length=25)
    event_place = models.CharField(max_length=25)
    event_date = models.DateField(auto_now_add = False)
    event_desc = models.CharField(max_length=300)
    post_by = models.CharField(max_length=40)
    
class Event_Comment(models.Model):
    event = models.ForeignKey(Events, unique=False)
    photo = models.CharField(max_length=100)
    comment = models.CharField(max_length=200)
    post_date = models.DateTimeField(auto_now_add = True)
    post_by = models.CharField(max_length=40)


class Event_Rsvp(models.Model):
    event = models.ForeignKey(Events, unique=False)
    user_id = models.CharField(max_length=40, unique=False)
    rsvp_val = models.IntegerField(max_length=1, unique=False)
    response_date = models.DateTimeField(auto_now_add = True)